<?php

/**
 * Framework_DB_NodeStack
 *
 *
 * @author Application Support Group
 * @copyright University of Georgia
 * @package BAMF
 * @see Framework_Object
 * @filesource
*/

class Framework_DB_NodeStack extends Framework_Object {

	protected $_data ;

	public function __construct() {
		parent::__construct() ;
		$this->_data = array() ;
	}




	public function add( Framework_DB_DaoNode $aNode ) {
		if( $aNode instanceof Framework_DB_DaoNode ) {
			array_push( $this->_data, $aNode ) ;
		} else {
			Framework_Util_Debug::show( 
					array( __METHOD__ , "Supplied argument is not a valid Framework_DB_DaoNode object." )
			) ;
		}
	}// end add




	public function pop() {
		return array_pop( $this->_data ) ;
	}// end pop





	public function size() {
		return count( $this->_data ) ;
	}// end size




	public function __destruct() {
		parent::__destruct() ;
	}

}

?>
